home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3c / ecvt.z / ecvt
Encoding:
Text File  |  2002-10-03  |  9.4 KB  |  133 lines

  1.  
  2.  
  3.  
  4. eeeeccccvvvvtttt((((3333CCCC))))                                                              eeeeccccvvvvtttt((((3333CCCC))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _eeee_cccc_vvvv_tttt, _ffff_cccc_vvvv_tttt, _gggg_cccc_vvvv_tttt, _eeee_cccc_vvvv_tttt______rrrr, _ffff_cccc_vvvv_tttt______rrrr, _eeee_cccc_vvvv_tttt_llll, _ffff_cccc_vvvv_tttt_llll, _gggg_cccc_vvvv_tttt_llll, _eeee_cccc_vvvv_tttt_llll______rrrr, _ffff_cccc_vvvv_tttt_llll______rrrr -
  10.      convert floating-point number to string
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_tttt_dddd_llll_iiii_bbbb_...._hhhh_>>>>
  14.  
  15.      _cccc_hhhh_aaaa_rrrr _****_eeee_cccc_vvvv_tttt _((((_dddd_oooo_uuuu_bbbb_llll_eeee _v_a_l_u_e_,,,, _iiii_nnnn_tttt _n_d_i_g_i_t_,,,, _iiii_nnnn_tttt _****_d_e_c_p_t_,,,, _iiii_nnnn_tttt _****_s_i_g_n_))))_;;;;
  16.  
  17.      _cccc_hhhh_aaaa_rrrr _****_ffff_cccc_vvvv_tttt _((((_dddd_oooo_uuuu_bbbb_llll_eeee _v_a_l_u_e_,,,, _iiii_nnnn_tttt _n_d_i_g_i_t_,,,, _iiii_nnnn_tttt _****_d_e_c_p_t_,,,, _iiii_nnnn_tttt _****_s_i_g_n_))))_;;;;
  18.  
  19.      _cccc_hhhh_aaaa_rrrr _****_gggg_cccc_vvvv_tttt _((((_dddd_oooo_uuuu_bbbb_llll_eeee _v_a_l_u_e_,,,, _iiii_nnnn_tttt _n_d_i_g_i_t_,,,, _cccc_hhhh_aaaa_rrrr _****_b_u_f_))))_;;;;
  20.  
  21.      _cccc_hhhh_aaaa_rrrr _****_eeee_cccc_vvvv_tttt______rrrr _((((_dddd_oooo_uuuu_bbbb_llll_eeee _v_a_l_u_e_,,,, _iiii_nnnn_tttt _n_d_i_g_i_t_,,,, _iiii_nnnn_tttt _****_d_e_c_p_t_,,,, _iiii_nnnn_tttt _****_s_i_g_n_,,,,
  22.                _cccc_hhhh_aaaa_rrrr _****_b_u_f_))))_;;;;
  23.  
  24.      _cccc_hhhh_aaaa_rrrr _****_ffff_cccc_vvvv_tttt______rrrr _((((_dddd_oooo_uuuu_bbbb_llll_eeee _v_a_l_u_e_,,,, _iiii_nnnn_tttt _n_d_i_g_i_t_,,,, _iiii_nnnn_tttt _****_d_e_c_p_t_,,,, _iiii_nnnn_tttt _****_s_i_g_n_,,,,
  25.                _cccc_hhhh_aaaa_rrrr _****_b_u_f_))))_;;;;
  26.  
  27.      _cccc_hhhh_aaaa_rrrr _****_eeee_cccc_vvvv_tttt_llll _((((_llll_oooo_nnnn_gggg _dddd_oooo_uuuu_bbbb_llll_eeee _v_a_l_u_e_,,,, _iiii_nnnn_tttt _n_d_i_g_i_t_,,,, _iiii_nnnn_tttt _****_d_e_c_p_t_,,,, _iiii_nnnn_tttt _****_s_i_g_n_))))_;;;;
  28.  
  29.      _cccc_hhhh_aaaa_rrrr _****_ffff_cccc_vvvv_tttt_llll _((((_llll_oooo_nnnn_gggg _dddd_oooo_uuuu_bbbb_llll_eeee _v_a_l_u_e_,,,, _iiii_nnnn_tttt _n_d_i_g_i_t_,,,, _iiii_nnnn_tttt _****_d_e_c_p_t_,,,, _iiii_nnnn_tttt _****_s_i_g_n_))))_;;;;
  30.  
  31.      _cccc_hhhh_aaaa_rrrr _****_gggg_cccc_vvvv_tttt_llll _((((_llll_oooo_nnnn_gggg _dddd_oooo_uuuu_bbbb_llll_eeee _v_a_l_u_e_,,,, _iiii_nnnn_tttt _n_d_i_g_i_t_,,,, _cccc_hhhh_aaaa_rrrr _****_b_u_f_))))_;;;;
  32.  
  33.      _cccc_hhhh_aaaa_rrrr _****_eeee_cccc_vvvv_tttt_llll______rrrr _((((_llll_oooo_nnnn_gggg _dddd_oooo_uuuu_bbbb_llll_eeee _v_a_l_u_e_,,,, _iiii_nnnn_tttt _n_d_i_g_i_t_,,,, _iiii_nnnn_tttt _****_d_e_c_p_t_,,,, _iiii_nnnn_tttt _****_s_i_g_n_,,,,
  34.                _cccc_hhhh_aaaa_rrrr _****_b_u_f_))))_;;;;
  35.  
  36.      _cccc_hhhh_aaaa_rrrr _****_ffff_cccc_vvvv_tttt_llll______rrrr _((((_llll_oooo_nnnn_gggg _dddd_oooo_uuuu_bbbb_llll_eeee _v_a_l_u_e_,,,, _iiii_nnnn_tttt _n_d_i_g_i_t_,,,, _iiii_nnnn_tttt _****_d_e_c_p_t_,,,, _iiii_nnnn_tttt _****_s_i_g_n_,,,,
  37.                _cccc_hhhh_aaaa_rrrr _****_b_u_f_))))_;;;;
  38.  
  39. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  40.      (Note that the long double routines are only valid for the MIPSpro
  41.      compilers.)  Long double functions have been renamed to be compliant with
  42.      the ANSI-C standard, however to be backward compatible, they may still be
  43.      called with the double precision function name prefixed with a q.
  44.      (Exceptions:  ecvtl_r and fcvtl_r can be called with names qecvt_r and
  45.      qfcvt_r, resp.)
  46.  
  47.      _eeee_cccc_vvvv_tttt converts _v_a_l_u_e to a null-terminated string of _n_d_i_g_i_t digits and
  48.      returns a pointer thereto.  The high-order digit is non-zero, unless the
  49.      value is zero.  The low-order digit is rounded.  The position of the
  50.      decimal point relative to the beginning of the string is stored
  51.      indirectly through _d_e_c_p_t (negative means to the left of the returned
  52.      digits). The decimal point is not included in the returned string.  If
  53.      the sign of the result is negative, the word pointed to by _s_i_g_n is non-
  54.      zero, otherwise it is zero.
  55.  
  56.      _ffff_cccc_vvvv_tttt is identical to _eeee_cccc_vvvv_tttt, except that the correct digit has been rounded
  57.      for _pppp_rrrr_iiii_nnnn_tttt_ffff _%%%%_ffff output of the number of digits specified by _n_d_i_g_i_t.
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. eeeeccccvvvvtttt((((3333CCCC))))                                                              eeeeccccvvvvtttt((((3333CCCC))))
  71.  
  72.  
  73.  
  74.      _gggg_cccc_vvvv_tttt converts the _v_a_l_u_e to a null-terminated string in the array pointed
  75.      to by _b_u_f and returns _b_u_f.  It attempts to produce _n_d_i_g_i_t significant
  76.      digits in _%%%%_ffff format if possible, otherwise _%%%%_eeee format (scientific
  77.      notation), ready for printing. A minus sign, if there is one, or a
  78.      decimal point will be included as part of the returned string.  Trailing
  79.      zeros are suppressed.
  80.  
  81.      _eeee_cccc_vvvv_tttt_llll, _ffff_cccc_vvvv_tttt_llll, and _gggg_cccc_vvvv_tttt_llll are the long double versions of functions _eeee_cccc_vvvv_tttt,
  82.      _ffff_cccc_vvvv_tttt, and _gggg_cccc_vvvv_tttt.
  83.  
  84.      _eeee_cccc_vvvv_tttt______rrrr and _ffff_cccc_vvvv_tttt______rrrr are reentrant versions of _eeee_cccc_vvvv_tttt and _ffff_cccc_vvvv_tttt.  They are
  85.      useful when multiple threads in a process wish to convert floating point
  86.      numbers to strings.  The conversion is produced in _b_u_f which should be at
  87.      least 84 characters long.  The return value is a pointer into _b_u_f which
  88.      may or may not point at the beginning of _b_u_f.  The feature test macro
  89.      ______SSSS_GGGG_IIII______RRRR_EEEE_EEEE_NNNN_TTTT_RRRR_AAAA_NNNN_TTTT______FFFF_UUUU_NNNN_CCCC_TTTT_IIII_OOOO_NNNN_SSSS should be defined to make these two functions
  90.      visible.
  91.  
  92.      _eeee_cccc_vvvv_tttt_llll______rrrr and _ffff_cccc_vvvv_tttt_llll______rrrr are the long double versions of functions _eeee_cccc_vvvv_tttt______rrrr and
  93.      _ffff_cccc_vvvv_tttt______rrrr.  Define ______SSSS_GGGG_IIII______RRRR_EEEE_EEEE_NNNN_TTTT_RRRR_AAAA_NNNN_TTTT______FFFF_UUUU_NNNN_CCCC_TTTT_IIII_OOOO_NNNN_SSSS to make these two functions
  94.      visible.
  95.  
  96. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  97.      _pppp_rrrr_iiii_nnnn_tttt_ffff(3S).
  98.  
  99. NNNNOOOOTTTTEEEESSSS
  100.      The values returned by _eeee_cccc_vvvv_tttt, _ffff_cccc_vvvv_tttt, _eeee_cccc_vvvv_tttt_llll, and _ffff_cccc_vvvv_tttt_llll point to a single
  101.      static data array whose content is overwritten by each call.
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.